<h1 align="center">Editar Asignatura</h1>
<div  class="area">
    <form action="" method="post" accept-charset="utf-8" enctype="multipart/form-data">
        <div class="split">
            
            <div class="split" style="width:30%; padding-left:15px;">
            <label>Id Asignatura</label>
            </div>
            <div class="split" style="width:70%;">
            <input name="idasignatura" type="text" value="<?php echo $asig[0][0]['idasignatura'] ?>" required size=20 maxlength="5" align="left"  readonly >
            </div></br></br>
            
            <div class="split" style="width:30%; padding-left:15px;">
            <label>Departamento</label>
            </div>
            <div class="split" style="width:70%;">
            <select name="iddepartamento" size="1">
                    <?php foreach ($departamentos as $depto): 
                    if($asig[0][0]['iddepartamento'] != $depto[0]['iddepartamento']){?>
                    <option value="<?php echo $depto[0]['iddepartamento'];?>"><?php echo $depto[0]['nombredepto']; ?></option>
                     <?php }else {?>
                    <option value="<?php echo $depto[0]['iddepartamento'];?>" selected><?php echo $depto[0]['nombredepto']; ?></option> 
                    <?php } endforeach; ?>
            </select>
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
            <label>Nombre Asignatura</label>
            </div>
            <div class="split" style="width:70%;">
            <input name="nombreasignatura" type="text" value="<?php echo $asig[0][0]['nombreasignatura'] ?>" required size=50 maxlength="50" align="left">
            </div></br></br>
            
            <div class="split" style="width:30%; padding-left:15px;">
            <label>Unidades Valorativas</label>
            </div>
            <div class="split" style="width:70%;">
            <input name="uval" type="text" value="<?php echo $asig[0][0]['uval'] ?>" required onkeypress="return justNumbers(event)" size=4 maxlength="1" align="left">
            </div></br></br>							
            						
		    <div class="split" style="width:30%; padding-left:15px;">
			<label>Prerrequisito</label>
			</div>
			<div class="split" style="width:70%;">
            <textarea id="" name="prerrequisito" required rows="3" cols="50"><?php echo $asig[0][0]['prerrequisito'] ?></textarea>
			</div></br></br>
						
            <div class="split" style="width:30%; padding-left:15px;">
            <label>tipoasignatura</label>
            </div>
            <div class="split" style="width:70%;">
            <select name="tipoasignatura" size="1">
                    <?php if($asig[0][0]['tipoasignatura'] == 1){?><option value="1" selected >Obligatoria</option>
                    <?php } else {?> <option value="1">Obligatoria</option> <?php }?>
                    <?php if($asig[0][0]['tipoasignatura'] == 2){?><option value="2" selected >Electiva</option>
                    <?php } else {?> <option value="2">Electiva</option> <?php }?>
            </select>        
            </div></br></br>
            
            <div class="split" style="width:30%; padding-left:15px;">
            <label>Ciclo</label>
            </div>
            <div class="split" style="width:70%;">
            <input name="nciclo" type="number" required size=20 maxlength="5" align="left" min="1" max="12" value="<?php echo $asig[0][0]['nciclo'] ?>">
            </div></br></br>
            
            <div class="split" style="width:30%; padding-left:15px;">
            <label>Programa</label>
            </div>
            <div class="split" style="width:70%;">
            <input name="programaurl" type="file" align="left" >
            </div></br></br>
						
			<div style="display:table;">
                <div style="display:table-row;">
				    <input class="boton" type="submit" name="Modificar" value="Modificar">
				</div>
			</div>
        
        </div>
	</form>
</div>
</br> 